package person;

abstract class Car {
	public abstract void drive() ;
	
}

class Motorcycle extends Car {
	public void drive() {
		System.out.println("摩托");
	}
}

class HandTractor extends Car {
	public void drive() {
		System.out.println("拖拉机");
	}
}

class CompactCar extends Car {
	public void drive() {
		System.out.println("小型汽车");
	}
}

public class ca {
	public static void main(String[] args) {
		Method(new Motorcycle());
		Method(new HandTractor());
		Method(new CompactCar());		
	}
	public static void Method(Car car) {
		car.drive();
	}

}